<template>
  <div>
    <!-- @click="this.$router.push({/})" -->
    <el-button type="info">新增</el-button>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="id" label="Id"> </el-table-column>
      <el-table-column prop="equipMentNum" label="设备编号"> </el-table-column>
      <el-table-column prop="principal" label="负责人"> </el-table-column>
      <el-table-column prop="connectionStatus" label="连接状态">
        <template slot-scope="scope">
          <span v-if="scope.row.connectionStatus == true">启用</span>
          <span v-if="scope.row.connectionStatus == false">禁用</span>
        </template>
      </el-table-column>
      <el-table-column prop="openStaus" label="开启状态">
        <template slot-scope="scope">
          <span v-if="scope.row.openStaus == true">启用</span>
          <span v-if="scope.row.openStaus == false">禁用</span>
        </template>
      </el-table-column>
      <el-table-column prop="openingTime" label="开启时间"> </el-table-column>
      <el-table-column prop="closingTime" label="关闭时间"> </el-table-column>
      <el-table-column prop="remark" label="备注"> </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="info" @click="delOled(scope.row.id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { getoledScreenapi } from "@/api/iotInfo/oledScreen";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    this.getOledScreens();
  },
  methods: {
    getOledScreens() {
      getoledScreenapi().then((res) => {
        this.tableData = res.data.data;
      });
    },
    delOled(id) {
      alert(id);
    },
  },
};
</script>
<style ></style>